import java.util.ArrayList;
import java.util.List;

public class StaticMethod {
	List<StaticPath> paths;
	
	public List<StaticPath> getPaths(){
		return paths;
	}
	
	public void setPaths(List<StaticPath> paths){
		this.paths = paths;
	}
	
	private String methodSignature;

	/**
	 * @return the methodSignature
	 */
	public String getMethodSignature() {
		return methodSignature;
	}

	/**
	 * @param methodSignature the methodSignature to set
	 */
	public void setMethodSignature(String methodSignature) {
		this.methodSignature = methodSignature;
	}

	public StaticMethod() {
		paths = new ArrayList<StaticPath>();
	}

	public void addPath(StaticPath path) {
		paths.add(path);
	}

	public int size() {
		return paths.size();
	}

	public StaticPath getPath(int index) {
		return paths.get(index);
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer("");
		sb.append("this method contains " + paths.size() + " paths");
		for (int i = 0; i < this.paths.size(); i++) {
			sb.append(this.paths.get(i).toString() + "\n");
		}
		return sb.toString();
	}

	public boolean callAgain(StaticPath path) {
		for (int i = 0; i < paths.size(); i++) {
			StaticPath mpath = paths.get(i);
			if (path.contains(mpath)) {
				return true;
			}
		}
		return false;
	}

	public void clearSamePath() {
		
	}
}